var obj = {
  name: 'zhangsan',
  age: 12,
  sayHello: function () {
    console.log('hello')
  }
}
var a = 'age'
// console.log(obj.name)
console.log(obj["age"])
console.log(obj[a])
// console.log(obj.sayHello())

// for (var key in obj) {
//   console.log(key)
//   console.log(obj[key])

// }
